Option Strict Off
Option Explicit On
Friend Class frmFramePerSecond
	Inherits System.Windows.Forms.Form
	Private Sub frmFramePerSecond_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		
		Me.Left = VB6.TwipsToPixelsX((VB6.PixelsToTwipsX(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width) / 2) - (VB6.PixelsToTwipsX(Me.Width) / 2)) 'Set the window to be in the middle of the screen
		Me.Top = VB6.TwipsToPixelsY((VB6.PixelsToTwipsY(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height) / 2) - ((VB6.PixelsToTwipsX(Me.Width) / 2) + 420)) 'Set the window raised up slightly. So it is better positioned when running at 1024 x 768
		Call ResetButtons() 'Set all buttons back to blue
		If UtilityFPS = 1 Then cmd1.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 2 Then cmd2.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 3 Then cmd3.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 4 Then cmd4.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 5 Then cmd5.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 6 Then cmd6.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 7 Then cmd7.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 8 Then cmd8.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 9 Then cmd9.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 10 Then cmd10.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 11 Then cmd11.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 12 Then cmd12.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 13 Then cmd13.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 14 Then cmd14.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 15 Then cmd15.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 16 Then cmd16.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 17 Then cmd17.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 18 Then cmd18.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 19 Then cmd19.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 20 Then cmd20.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 21 Then cmd21.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 22 Then cmd22.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 23 Then cmd23.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 24 Then cmd24.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 25 Then cmd25.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 26 Then cmd26.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 27 Then cmd27.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 28 Then cmd28.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 29 Then cmd29.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		If UtilityFPS = 30 Then cmd30.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		
	End Sub
	Private Sub cmdCloseFPS_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdCloseFPS.Click
		Me.Visible = False 'Hide the form
		frmUtilities2.cmdFPS.Text = UtilityFPS & " Frames per Second" 'Reset the button on the main form to show the correct frames per second
	End Sub
	Private Sub cmd1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd1.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd1.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 1 'Set the variable to the correct value
	End Sub
	Private Sub cmd2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd2.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd2.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 2 'Set the variable to the correct value
	End Sub
	Private Sub cmd3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd3.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd3.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 3 'Set the variable to the correct value
	End Sub
	Private Sub cmd4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd4.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd4.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 4 'Set the variable to the correct value
	End Sub
	Private Sub cmd5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd5.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd5.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 5 'Set the variable to the correct value
	End Sub
	Private Sub cmd6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd6.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd6.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 6 'Set the variable to the correct value
	End Sub
	Private Sub cmd7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd7.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd7.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 7 'Set the variable to the correct value
	End Sub
	Private Sub cmd8_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd8.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd8.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 8 'Set the variable to the correct value
	End Sub
	Private Sub cmd9_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd9.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd9.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 9 'Set the variable to the correct value
	End Sub
	Private Sub cmd10_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd10.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd10.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 10 'Set the variable to the correct value
	End Sub
	Private Sub cmd11_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd11.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd11.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 11 'Set the variable to the correct value
	End Sub
	Private Sub cmd12_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd12.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd12.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 12 'Set the variable to the correct value
	End Sub
	Private Sub cmd13_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd13.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd13.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 13 'Set the variable to the correct value
	End Sub
	Private Sub cmd14_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd14.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd14.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 14 'Set the variable to the correct value
	End Sub
	Private Sub cmd15_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd15.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd15.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 15 'Set the variable to the correct value
	End Sub
	Private Sub cmd16_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd16.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd16.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 16 'Set the variable to the correct value
	End Sub
	Private Sub cmd17_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd17.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd17.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 17 'Set the variable to the correct value
	End Sub
	Private Sub cmd18_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd18.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd18.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 18 'Set the variable to the correct value
	End Sub
	Private Sub cmd19_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd19.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd19.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 19 'Set the variable to the correct value
	End Sub
	Private Sub cmd20_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd20.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd20.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 20 'Set the variable to the correct value
	End Sub
	Private Sub cmd21_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd21.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd21.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 21 'Set the variable to the correct value
	End Sub
	Private Sub cmd22_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd22.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd22.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 22 'Set the variable to the correct value
	End Sub
	Private Sub cmd23_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd23.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd23.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 23 'Set the variable to the correct value
	End Sub
	Private Sub cmd24_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd24.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd24.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 24 'Set the variable to the correct value
	End Sub
	Private Sub cmd25_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd25.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd25.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 25 'Set the variable to the correct value
	End Sub
	Private Sub cmd26_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd26.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd26.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 26 'Set the variable to the correct value
	End Sub
	Private Sub cmd27_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd27.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd27.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 27 'Set the variable to the correct value
	End Sub
	Private Sub cmd28_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd28.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd28.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 28 'Set the variable to the correct value
	End Sub
	Private Sub cmd29_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd29.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd29.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 29 'Set the variable to the correct value
	End Sub
	Private Sub cmd30_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmd30.Click
		Call ResetButtons() 'Set all buttons back to blue
		cmd30.BackColor = System.Drawing.ColorTranslator.FromOle(&H80) 'Set the button to have a red background
		UtilityFPS = 30 'Set the variable to the correct value
	End Sub
	
	Private Sub ResetButtons()
		'This resets all buttons to blue
		cmd1.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd2.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd3.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd4.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd5.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd6.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd7.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd8.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd9.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd10.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd11.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd12.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd13.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd14.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd15.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd16.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd17.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd18.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd19.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd20.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd21.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd22.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd23.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd24.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd25.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd26.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd27.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd28.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd29.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		cmd30.BackColor = System.Drawing.ColorTranslator.FromOle(&HFFC8C8)
		
	End Sub
End Class